package org.baicaixiaozhan.learnsringbootvuedemo.service.impl;

import org.baicaixiaozhan.learnsringbootvuedemo.dao.CategoryDao;
import org.baicaixiaozhan.learnsringbootvuedemo.domain.Category;
import org.baicaixiaozhan.learnsringbootvuedemo.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author baicaixiaozhan
 * @since 2020/11/20
 */

@Service("categoryServiceImpl")
public class CategoryServiceImpl implements CategoryService {

    private final CategoryDao categoryDao;
    @Autowired
    public CategoryServiceImpl(CategoryDao categoryDao) {
        this.categoryDao = categoryDao;
    }

    @Override
    public List<Category> getAllList() {
        return categoryDao.selectAllCategoryList();
    }
}
